package cn.com.yinhex.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import cn.com.yinhex.domain.User;
import cn.com.yinhex.service.UserService;

@Controller
@RequestMapping("/index")
public class IndexController{
	@Resource(name="userService")
	private UserService userService;
    
	@RequestMapping(value = "index", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mav = new ModelAndView();
		mav.addObject("test", "hello world!");
		mav.setViewName("main");
		System.out.println("---======11111我进来啦TestController");
		return mav;
	}



}
